package com.moss.cloud.base.biz.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.moss.cloud.base.api.model.from.AddMenuFrom;
import com.moss.cloud.base.api.model.from.BaseFrom;
import com.moss.cloud.base.api.model.from.EditMenuFrom;
import com.moss.cloud.common.base.model.po.SysMenu;
import com.moss.cloud.common.core.model.vo.ProTree;

import java.util.List;

/**
 * 菜单业务接口
 *
 * @author 瑾年
 * @date 2023年4月16日
 */
public interface ISysMenuService extends IService<SysMenu> {
    /**
     * 查询当前登录人的菜单树
     *
     * @return
     */
    List<ProTree> menuTree();

    /**
     * 查询用户角色数据
     *
     * @param roleIds
     * @return
     */
    List<SysMenu> userSysMenus(List<Long> roleIds);

    /**
     * 获取菜单信息
     *
     * @param baseFrom
     * @return
     */
    SysMenu menuInfo(BaseFrom baseFrom);

    /**
     * 编辑菜单
     *
     * @param editMenuFrom
     * @return
     */
    Boolean editSysMenu(EditMenuFrom editMenuFrom);

    /**
     * 添加菜单
     *
     * @param addMenuFrom
     * @return
     */
    Boolean addSysMenu(AddMenuFrom addMenuFrom);

    /**
     * 删除菜单
     *
     * @param baseFrom
     * @return
     */
    Boolean removeSysMenu(BaseFrom baseFrom);

    /**
     * 刷新资源池
     *
     * @return
     */
    boolean refreshSysMenu();
}
